<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>测试页</title>
	<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/echarts/4.8.0/echarts.js"></script>
	<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.css" rel="stylesheet">
	
	<script src="https://www.layuicdn.com/layui-v2.5.6/layui.js"></script>
	<link href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css" rel="stylesheet">
	<style type="text/css">
		.all,.main_div{
			padding: 1px 15px 1px 10px;
		}
		.div_header{
			text-align: center;
			font-weight111: bold;
			font-size: 16px;
			border-bottom: 1px solid;
			padding-bottom: 10px;
			padding-top: 10px;
		}
		
		.myHidestyle { visibility: hidden; }
		
		a {
    		color: blue;
    		text-decoration: underline;
    		cursor: pointer;
		}
		
	</style>
</head>
<body>
	<div id="el" class="all">
		<div class="div_header">
			<div class="row">
				<div class="col-md-3">
					<span>登录人 _session_user：</span>
					<input style="width: 120px;" type="text" v-model="queryParam._session_user">
				</div>
				<div class="col-md-3">
					<span>申报人姓名：</span>
					<input style="width: 120px;" type="text" v-model="queryParam.sbr_name">
				</div>
				<div class="col-md-3">
					<span>小区名称：</span>
					<input style="width: 120px;" type="text" v-model="queryParam.xqmc">
				</div>
				<div class="col-md-3">
					<span>财务通过时间-start：</span>
					<input style="width: 120px;" type="text" v-model="queryParam.sp_time_start">
				</div>
				<div class="col-md-3">
					<span>财务通过时间-end：</span>
					<input style="width: 120px;" type="text" v-model="queryParam.sp_time_end">
				</div>
				
				<div class="col-md-3">
					<span>移交时间-start：</span>
					<input style="width: 120px;" type="text" v-model="queryParam.yj_time_start">
				</div>
				<div class="col-md-3">
					<span>移交时间-end：</span>
					<input style="width: 120px;" type="text" v-model="queryParam.yj_time_end">
				</div>
				<div class="col-md-3">	
					<button type="button" class="btn btn-primary " @click="queryList();">查询</button>
					<button type="button" class="btn btn-primary " @click="_resetQueryParam();">重置</button>
				</div>
				
				<div class="col-md-3">
					<span>状态：</span>
					<select style="width: 120px;"  v-model="queryParam.is_yj">
						<option value="">全部</option>
						<option value="0">未移交</option>
						<option value="1">已移交</option>
					</select>
				</div>
			</div>
		</div>
		<div class="div_main">
			<div id="div_content" class="main_div">
				<div id="mainList" style="width: 100%;">
					
				</div>
			</div>
		</div>
		
		
		
		
	<div id="addDiv" style="width: 350px; height: 230px;padding: 15px;display: none;">
		<span>要件列表：</span>
		<div id="temp_item"></div>
		
		驳回说明<input id="bohui_content" type="text">
		<button type="button" class="btn btn-primary " @click="go_state(1);">通过</button>
		<button type="button" class="btn btn-primary " @click="go_state(2);">驳回</button>
	</div>
		
		
	</div>
	
</body>
<script type="text/javascript">

	//var asd = '[[${aaa}]]';

	Vue.prototype._resetQueryParam = function(){
		//console.log(this.queryParam);
		//递归
		//this.queryParam
		for(let i in this.queryParam){
			this.queryParam[i] = null;
		}
		if(this.queryList)
			this.queryList();
	};
	
	layui.use('layer', function(){
		window._layer = layui.layer;
	});

	var app = new Vue({
	  	el: '#el',
	  	data: {
	  		addIndex: null,
	    	queryParam: {
	    		
	    	},
	    	go_state_param: {},
	    	queryMvpItemList: []
	  	},
	  	methods: {
	  		doYj: function(rel_base_id, sp_bat, type_flag){
	  			var self = this;
	  			jQuery.ajax({
					url: '[[@{/}]]rest/mat/system/doYj',
					async: true,
					//dataType: 'json',
					contentType: "application/json",
					type: 'post',
					data: JSON.stringify({
						rel_base_id: rel_base_id,
						sp_bat: sp_bat,
						type_flag: type_flag
					}),
					success: function(res){
						self.queryList();
					}
				});
	  		},
			queryList: function(){
				var self = this;
				
				var cols;
				//if(pageType == 'sq' && pageType_plus == 1){
					cols = [ [
				    	{type:'checkbox'}
				    	  ,{field:'sbr_name', width:111, title: '申报人姓名'}
				    	  ,{field:'sbr_phone', width:111, title: '联系电话', sort: false}
				    	  ,{field:'sbdw', width:111, title: '申报单位', sort: false}
				    	  ,{field:'xqmc', width:111, title: '小区名称', sort: false}
				    	  ,{field:'wxxm', width:111, title: '维修项目', sort: false}
				    	  ,{field:'js_ws_money', width:111, title: '维修资金划转金额（元）', sort: false}
				    	  ,{field:'max_sp_date', width:111, title: '财务通过时间', sort: false}
				    	  ,{field:'bank_person_name', width:111, title: '移交人', sort: false}
				    	  ,{field:'bank_date', width:111, title: '移交时间', sort: false}
				    	  ,{field:'id', width:121, title: '操作', templet: function(row){
				    		  //return 111;
				    		  
return "<a onclick=\"app.doYj('"+row.rel_base_id+"', '"+row.sp_bat+"', '"+row.type_flag+"');\">移交</a>";
				    			
				    		}}
				    	  
				    ] ];
				//}
				layui.use('table', function(){
				  var table = layui.table;
				  window.myTable = table;
				  //var xh= $(window).height() -($("#projectList").height()+$("#mainList").offset().top-$(document).scrollTop());
				  var xh = 400;
				  table.render({
				    elem: '#mainList'
				    ,method: "get"
				    ,url: '/moon/rest/mat/system/queryBankList'
				    ,height: xh - 20
				    ,where: jQuery.extend({}, self.queryParam)
				    ,page: true
				    ,parseData: function(res){ //res 即为原始返回的数据
				        return {
				          "code": 0, //解析接口状态
				          "msg": res.msg, //解析提示文本
				          "count": res.data.total, //解析数据长度
				          "data": res.data.list //解析数据列表
				        };
				    }
				    ,request: {
				        pageName: 'currentPage' //页码的参数名称，默认：page
				        ,limitName: 'pageSize' //每页数据量的参数名，默认：limit
				    }
				    ,cols: cols
				  });
			      
				});
				
			}
			
	  	},
	  	mounted: function(){
		  	this.queryList();
		  	
	  	}
	})
</script>
</html>